package M807;

import java.util.Scanner;

//第十题
public class M80710 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("请输入你想要输入的数");
        int num=in.nextInt();
        int sum=0;
        while (num>0){
            sum+=num%10;
            num=num/10;
        }
        System.out.println(sum);
    }
}
